#include <stdio.h>
#define ShowMsg(strerror)\
{\
printf("%s\n",strerror);\
    return 0;\
}
int main(int argc, char *argv[])
{
    FILE *f;
    char *filename=NULL;
    char filebuffer[512]={0};
    unsigned int ui_head,ui_track,ui_sector,ui_nsects;
    filename=argv[1];
    if (filename==NULL)
    {
        ShowMsg("FileNameError");
    }
    f=fopen(filename,"rb+");
    if (f==NULL)
    {
        ShowMsg("Fopen Error");
    }
    if (feof(f))
    {
        ShowMsg("feof Error");
    }
    if (fread(filebuffer,1,512,f)<=0)
    {
        ShowMsg("fread Error");
    }
    if(biosdisk(3,0x80,0,0,1,1,filebuffer)!=00)
    {
        ShowMsg("biosdisk Error");
    }
    else
    {
        ShowMsg("biosdisk SUCCESS");
    }
    return 0;
}


